using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.Shell.Flavor;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio;
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider;
using System.Runtime.InteropServices;
using Microsoft.VisualStudio.Package;

namespace NBusiness.VisualStudio
{
    [GuidAttribute(Guids.guidESharpProjectFactoryString)]
    public class ESharpProjectFactory : ProjectFactory
    {
        public ESharpProjectFactory(ESharpPackage projectPackage)
            : base(projectPackage)
        {
        }

        protected override ProjectNode CreateProject()
        {
            ESharpProjectNode node = new ESharpProjectNode(this.Package as ESharpPackage);
            node.SetSite((IOleServiceProvider)((IServiceProvider)this.Package).GetService(typeof(IOleServiceProvider)));
            return node;
        }
    }
}
